<template>
  <div class="page-container detail-container">
    <h3 class="detail-sub-title">渠道商信息</h3>
    <el-row :gutter="20">
      <el-col :span="8">渠道商ID<span class="detail-value">{{detailData.id}}</span></el-col>
      <el-col :span="8">渠道商名称<span class="detail-value">{{detailData.name}}</span></el-col>
      <el-col :span="8">联系电话<span class="detail-value">{{detailData.phone}}</span></el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="8">所在地区<span class="detail-value">{{detailData.regionCode}}</span></el-col>
      <el-col :span="8">详细地址<span class="detail-value">{{detailData.address}}</span></el-col>
      <el-col :span="8">销售来源<span class="detail-value">{{detailData.saleSource}}</span></el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="8">权益品牌<span class="detail-value">{{detailData.bankName}}</span></el-col>
      <el-col :span="8">权益产品<span class="detail-value">{{detailData.productName}}</span>
      </el-col>
      <el-col :span="8">已销售数量<span class="detail-value">{{detailData.totalSaleAmount}}</span>
        <el-button type="primary" size="mini" @click="linkToDetail">查看详单</el-button>
      </el-col>
    </el-row>
    <h3 class="detail-sub-title">对公账户</h3>
    <el-row :gutter="20">
      <el-col :span="8">银行名称<span class="detail-value">{{detailData.bankName}}</span></el-col>
      <el-col :span="8">银行卡号<span class="detail-value">{{detailData.cardNum}}</span></el-col>
      <el-col :span="8">户名<span class="detail-value">{{detailData.accountName}}</span></el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="8">开户行<span class="detail-value">{{detailData.branch}}</span></el-col>
    </el-row>
    <h3 class="detail-sub-title">税务信息</h3>
    <el-row :gutter="20">
      <el-col :span="8">公司名称<span class="detail-value">{{detailData.companyName}}</span></el-col>
      <el-col :span="8">识别码<span class="detail-value">{{detailData.identifyNum}}</span></el-col>
    </el-row>
    <div class="detail-toolbar">
      <el-button size="small" @click="cancel">返回</el-button>
    </div>
  </div>
</template>

<script>
import {STATUS} from '@/utils/const';
import {channelDetail} from '@/api/channel'

export default {
  name: 'CinemaDetail',
  props: ['selectData'],
  data() {
    this.STATUS = STATUS;
    return {
      detailData: {}
    }
  },
  methods: {
    async requestDetail(id) {
      try {
        const {data} = await channelDetail(id);
        this.detailData = {...data};
      } catch (error) {
        
      }
    },
    cancel() {
      this.$router.go(-1);
    },
    linkToDetail() {
      this.$router.push({name: 'channelSaleEquity'})
    }
  },
  created() {
    const {id} = this.$route.params;
    if (id) {
      this.requestDetail(id);
    } else {
      ths.cancel()
    }
  }
}
</script>

<style lang="scss">

</style>